package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

    /**
     * 判断是否用户已经注册我的后端
     *
     * @param openid 标识
     * @return
     */
    @Select("select * from user where openid=#{openid}")
    User selectUserByOpenId(String openid);

    void addUser(User user);

    @Select("select * from  user where id=#{userId}")
    User getUserName(Long userId);
@Select("select * from user where id=#{userId}")
    User getById(Long userId);
}
